 <include file="Public:head"/>
	<script src="{iMicms::STATICS}/jquery-ui.js" type="text/javascript"></script>
	<link rel="stylesheet" type="text/css" href="{iMicms::STATICS}/jquery-ui.css" />
    <link rel="stylesheet" type="text/css" href="{iMicms::STATICS}/jquery-ui.theme.css" />
	<link rel="stylesheet" type="text/css" href="{iMicms::STATICS}/jquery-ui.structure.css" />
	
	<style>
.img{
  width:80px;
  height:80px;
}
.img img{
	width:100%;
	display:block;
}
.countadd{
margin-top:-10px;
}
label{
display:inline;
}
.linkp{
list-style-type:none;
margin-right:30px;
text-align:right;
color:red;
letter-spacing:5px;
}
.linkp a{
color:#000;
}
.linkp li a{
letter-spacing:2px;
}
.linkp .total{
float:right;
}
</style>
<div class="content">
         
          <div class="cLineB">
             <h4 class="left">添加新的选手信息<span class="FAQ"></span></h4>
              <div class="clr"></div>			 
              <a href="{iMicms::U('Vote/eitem',array('token'=>$_GET['token'],'id'=>$_GET['id']))}" class="right btn btn-primary btn_submit  J_ajax_submit_btn" style="margin-top:-27px;margin-right:40px">返回选手列表</a>
			 
          </div>
     <div class="msgWrap bgfc">
        
		   
		   <table class="userinfoArea">
		   <tr>
			<div> 姓名：<input type="text" id="additem"  size="30" class="msgtext" style="width:70%;"></div>
			<div> 排序：<input type="text" id="addrank"  size="30" class="msgtext" style="width:70%;" ></div>
			<div>票数：<input type="text" id="addvcount" size="30" class="msgtext" style="width:70%;" >
			</div>
			 <div>电话：<input type="text" id="addtourl"  size="30" class="msgtext" style="width:70%;"></div>
			
			<div>封面照片：<input type="text" id="addstartpicurl"  size="30" class="msgtext" style="width:50%;" >
					<a href="#" onclick="upyunPicUpload('addstartpicurl',700,400,'{iMicms:$token}')" class="btn btn-primary btn_submit  J_ajax_submit_btn">上传</a> 
					<a href="#" onclick="viewImg('addstartpicurl')">预览</a></div>
					<div> 照片2： <input type="text" id="addstartpicurl2" size="30" class="msgtext" style="width:50%;" >
					<a href="#" onclick="upyunPicUpload('addstartpicurl2',700,400,'{iMicms:$token}')" class="btn btn-primary btn_submit  J_ajax_submit_btn">上传</a> 
					<a href="#" onclick="viewImg('addstartpicurl2')">预览</a></div>
					<div> 照片3： <input type="text" id="addstartpicurl3"  size="30" class="msgtext" style="width:50%;" >
					<a href="#" onclick="upyunPicUpload('addstartpicurl3',700,400,'{iMicms:$token}')" class="btn btn-primary btn_submit  J_ajax_submit_btn">上传</a> 
					<a href="#" onclick="viewImg('addstartpicurl3')">预览</a></div>
					<div> 照片4： <input type="text" id="addstartpicurl4" size="30" class="msgtext" style="width:50%;" >
					<a href="#" onclick="upyunPicUpload('addstartpicurl4',700,400,'{iMicms:$token}')" class="btn btn-primary btn_submit  J_ajax_submit_btn">上传</a> 
					<a href="#" onclick="viewImg('addstartpicurl4')">预览</a></div>
					
					 <div>简介：<br/>
			 <textarea id="content1" name="addintro" style="width: 70%; height: 300px; "></textarea>
			</div><br/>
			   </tr>
			 
				<tr>
				<div style="align:left;text-align:left;">
			  <a href="javascript:;" onclick="additem()" class="right btn btn-primary btn_submit  J_ajax_submit_btn" style="float:left">提交</a>
				</div>
				 </tr>
		   </table>
		 
		   </div>
		   
		  
		<div style="clear:both"></div>
	<script type="text/javascript">
	$(document).ready(function(){

		});
	function additem(){
			var item = $("#additem").val();
			var rank = $("#addrank").val();
			var vcount = $("#addvcount").val();
			var tourl = $("#addtourl").val();
			var intro = $("#content1").val();
			var startpicurl = $("#addstartpicurl").val();
			var startpicurl2 = $("#addstartpicurl2").val();
			var startpicurl3 = $("#addstartpicurl3").val();
			var startpicurl4 = $("#addstartpicurl4").val();
			
			var submitData={
				vid  : {iMicms:$vid},
				item : item,
				rank : rank,
				vcount : vcount,
				tourl : tourl,
				intro : intro,
				startpicurl : startpicurl,
				startpicurl2 : startpicurl2,
				startpicurl3 : startpicurl3,
				startpicurl4 : startpicurl4
			};
			$.post('index.php?g=User&m=Vote&a=eitem_add', submitData, function(bakcdata) 
			{
					var obj=eval('('+bakcdata+')');
						if(obj.success == 1)
							{
								alert(obj.msg);
								parent.location="javascript:location.reload()";
								return 0;
							}
						else
							{
								alert(obj.msg);
								return false;
							}  
				});
			$(this).dialog('close');
			
	}
	
	
	
 </script>
   </div> 
          <div class="cLine">
            <div class="pageNavigator right">
                 <div class="pages"></div>
              </div>
            <div class="clr"></div>
          </div>
  </div>
<include file="Public:footer"/>